<HTML><HEAD><TITLE>fzn_init(++SolverOrOptions, -FznState)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(flatzinc)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>fzn_init(++SolverOrOptions, -FznState)</H1>
Initialize a FlatZinc solver
<DL>
<DT><EM>SolverOrOptions</EM></DT>
<DD>Name of solver mapping module, or zn_options-structure
</DD>
<DT><EM>FznState</EM></DT>
<DD>Output: a FlatZinc state descriptor
</DD>
</DL>
<H2>Description</H2>
<P>
	Initialize a FlatZinc solver and return a descriptor, ready
	for loading the model.  The given solver options are taken
	into account and remembered in the descriptor.
    </P>
<H3>Modes and Determinism</H3><UL>
<LI>fzn_init(++, -) is det
</UL>
<H2>Examples</H2>
<PRE>
    my_fzn_run_stream(ModelStream, Options) :-
	fzn_init(Options, State),
	fzn_load_stream(ModelStream, State),
	fzn_search(State),
	fzn_output(State).
</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/flatzinc/fzn_load_stream-2.html">fzn_load_stream / 2</A>, <A HREF="../../lib_public/flatzinc/fzn_search-1.html">fzn_search / 1</A>, <A HREF="../../lib_public/flatzinc/fzn_output-1.html">fzn_output / 1</A>, <A HREF="../../lib_public/flatzinc/zn_options-s.html">struct(zn_options)</A>
</BODY></HTML>
